var myVue = new Vue({
	el: "body",
	data: {
		username: "未登录",
		isLogined:false
	},
	created: function() {
		init();
		_this = this
		currentUser = AV.User.current();
		if(currentUser) {
			_this.isLogined=true;
			_this.username = currentUser.attributes.username
		}
	},
	methods: {
		isLogin: function() {
			verifyLogin()
		},
		myFav:function  () {
			location.href="./fav.html"
		},
		myAddress:function  () {
			location.href="./address.html"
		},
		exit:function  () {
			loginout()
		},
		myOrder:function  () {
			location.href="./order.html"
		}
		
	}
})

function verifyLogin() {
	currentUser = AV.User.current();
	if(currentUser) {
	} else {
		location.href = "login.html?RetUrl=" + getPageUrl()
	}
}